﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MachineVision.Core.Extensions
{
    public static class DoubleExtensions
    {
        /// <summary>
        /// 保留Double类型小数位数
        /// </summary>
        /// <param name="value"></param>
        /// <param name="len"></param>
        /// <returns></returns>
        public static double RetainLen(this double value, int len)
        {
            return Math.Round(value, len);
        }

    }
}
